<!DOCTYPE html>
<html>
<head table_background=RybLxl >
	<meta charset="UTF-8">
    <title>{$seoinfo['seotitle']}-{$GLOBALS['cfg_webname']}</title>
    {if $seoinfo['keyword']}
    <meta name="keywords" content="{$seoinfo['keyword']}" />
    {/if}
    {if $seoinfo['description']}
    <meta name="description" content="{$seoinfo['description']}" />
    {/if}
    {include "pub/varname"}

    {Common::css('base.css,extend.css')}
    {Common::css_plugin('index.css','ferry')}
    {Common::js('jquery.min.js,base.js,common.js,template.js,delayLoading.min.js')}
    {Common::js_plugin('swiper/swiper2.min.js,laypage/laypage.js','ferry')}
    {Common::css_plugin('../js/swiper/swiper2.css','ferry')}
</head>
 
<body>

{request "pub/header"}

  <div class="fl100">
    <!-- banner -->
    <div class="banner">

        {st:ad action="getad" name="FerryRollingAd" pc="1" return="ferryad"}
        <div class="swiper-container banner-swiper">
            <div class="swiper-wrapper">
                {loop $ferryad['aditems'] $k $v}
                <div class="swiper-slide"><a href="{$v['adlink']}" target="_blank"><img src="{Common::img($v['adsrc'],1920,380)}" alt="{$v['adname']}"></a></div>
                {/loop}
            </div>
        </div>
        <a class="banner-prev" href="javascript:void(0)"></a>
        <a class="banner-next" href="javascript:void(0)"></a>
        <div class="banner-pagination"></div>
        <div class="banner-keyword">
            <div class="item">
                <h4 class="title">热门目的地</h4>
                <ul class="clearfix">
                    {st:dest action="query" flag="hot" typeid="$typeid" row="8"}
                    {loop $data $row}
                    <li><a href="/ferrys/{$row['pinyin']}/" target="_blank">{$row['kindname']}</a></li>
                    {/loop}
                </ul>
            </div>
            <div class="item">
                <h4 class="title">热门景点</h4>
                <ul class="clearfix">
                    {st:ferry action="query" flag="order" platform="5"  row="6" return="ferrylist"}

                    {loop $ferrylist $ferry}
                    <li><a href="{$ferry['url']}" target="_blank">{$ferry['title']}</a></li>
                    {/loop}
                </ul>
            </div>
            <div class="item item3">
                {st:attr action="query" flag="grouplist" typeid="$typeid" return="grouplist" row="1"}
                <h4 class="title">{St_String::cut_html_str($grouplist[0]['attrname'],10)}</h4>
                <ul class="clearfix">
                    {st:attr action="query" flag="childitem" typeid="$typeid" groupid="$grouplist[0]['id']" return="attrlist" row="6"}
                    {loop $attrlist  $attr}
                    <li><a href="/ferrys/all-0-0-{$attr['id']}-1" target="_blank">{$attr['attrname']}</a></li>
                    {/loop}
                </ul>
            </div>
        </div>
    </div>

    <!-- 面包屑 -->
    <div class="subnav">
        <div class="wm-1200">
            <a href="/">{$GLOBALS['cfg_indexname']}</a>
            <span class="symbol">&gt;</span>
            <span class="present">{$channelname}</span>
        </div>
    </div>

    <!-- 特价 -->
    <div class="ticket-discounts">
        <div class="wm-1200">
            <ul class="clearfix">
                {st:ferry action="query" flag="order" platform="5"  row="4" return="ferrylist"}
                {loop $ferrylist $ferry}
                <li>
                    <a href="{$ferry['url']}" target="_blank">
                        <div class="img"><img src="{Common::img($ferry['litpic'],220,120)}" alt=""></div>
                        <div class="li-con">
                            <h3 class="title">{$ferry['title']}</h3>
                            <div class="price clearfix">
                                {if $ferry['price']}
                                <p class="now">{Currency_Tool::symbol()}<span>{$ferry['price']}</span>起</p>
                                {else}
                                <p class="now"><span>电询</span></p>
                                {/if}
                                {if $ferry['sellprice']}
                                <p class="before"><i class="currency_sy">{Currency_Tool::symbol()}</i>{$ferry['sellprice']}</p>
                                {/if}
                                <p class="rush">抢购</p>
                            </div>
                        </div>
                    </a>
                </li>
                {/loop}
            </ul>
        </div>
    </div>

    <!-- 推荐景点 -->
    <div class="ticket-recommend">
        <div class="wm-1200">
            <div class="recommend-title clearfix">
                <h2 class="h2">推荐景点</h2>
                <a class="more" href="/ferrys/all" target="_blank">更多 &gt;</a>
            </div>
            <div class="recommend-con clearfix">
                <div class="left">

                    {st:ad action="getad" name="FerryLeftSingleAd" return="leftad1"}
                    {if !empty($leftad1)}
                    <div class="img"><a href="{$leftad1['adlink']}" target="_blank"><img src="{Common::img($leftad1['adsrc'])}" alt=""></a></div>
                    {/if}
                    {st:attr action="query" flag="grouplist" typeid="$typeid" return="grouplist" row="1"}

                    {st:attr action="query" flag="childitem" typeid="$typeid" groupid="$grouplist[0]['id']" return="attrlist" row="6"}
                    {loop $attrlist  $attr}
                   <a href="/ferrys/all-0-0-{$attr['id']}-1" target="_blank">{$attr['attrname']}</a>
                    {/loop}
                    <a href="/ferrys/all" target="_blank">更多</a>
                </div>

                {st:dest action="query" flag="hot" typeid="$typeid" row="4" return="dest_list"}

                <div class="recommend-right">
                    <div class="swiper-container recommend-swiper">
                        <div class="swiper-wrapper">

                            {loop $dest_list  $dest}
                            {st:ferry action="query" flag="mdd" platform="5" destid="$dest['id']" row="8" return="ferrylist"}
                            <div class="swiper-slide">
                                <ul class="clearfix">
                                    {loop $ferrylist $ferry_key $ferry}
                                    <li class="{if $n>4}mb0{/if} {if $n%4==0}mr0{/if}">
                                        <a href="{$ferry['url']}" target="_blank">
                                            <div class="img"><img src="{Common::img($ferry['litpic'],224,120)}" alt=""></div>
                                            <div class="li-con">
                                                <h3 class="title">{$ferry['title']}</h3>
                                                <div class="info clearfix">
                                                    {if ($GLOBALS['cfg_satisfy']==1)}
                                                    <p class="satisficing">{$ferry['satisfyscore']} 满意</p>
                                                    {/if}
                                                    <p class="price">
                                                        {if $ferry['price']}
                                                        <span class="b"><i class="currency_sy">{Currency_Tool::symbol()}</i></span><span class="n">{$ferry['price']}</span>起
                                                        {else}
                                                        <span class="n">电询</span>
                                                        {/if}
                                                    </p>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    {/loop}
                                </ul>
                            </div>
                            {/loop}
                        </div>
                    </div>
                    <div class="recommend-pagination"></div>
                </div>
            </div>
        </div>
    </div>


  </div>

{request "pub/footer"}
{request "pub/flink"}

{st:dest action="query" flag="hot" typeid="$typeid" row="4" return="dest_list"}

  {php}
    $dest_arr = array();
    foreach($dest_list as $dest)
    {
       $dest_arr[] = $dest['kindname'];
    }
  {/php}


	<script>
        $(function(){
            // banner
            var bannerSwiper = $('.banner-swiper').swiper({
                pagination: '.banner-pagination',
                loop:true,
                grabCursor: true,
                autoplay: 3000,
                paginationClickable: true
            });
            $('.banner-prev').on('click', function(e){
                e.preventDefault()
                bannerSwiper.swipePrev()
            });
            $('.banner-next').on('click', function(e){
                e.preventDefault()
                bannerSwiper.swipeNext()
            });

            // 推荐景点
            var recommendSwiper = $('.recommend-swiper').swiper({
                pagination: '.recommend-pagination',
                loop:true,
                paginationClickable: true,
                simulateTouch : false,
                onSwiperCreated: function(swiper){
                    var s={json_encode($dest_arr)};
                    $(swiper.paginationButtons).each(function(index){
                        $(this).html(s[index]);
                    })
                }
            });
            $('.banner .swiper-pagination-switch,.recommend-pagination .swiper-pagination-switch').on('hover',function(){
                $(this).click();
            });

        })

	</script>

</body>

</html>